<html>
<head>
<title>Debugging subcircuits</title>
</head>

<body bgcolor="FFFFFF">

<h1>Debugging subcircuits</h1>

<p>As you test larger circuits, you will likely find bugs. To nail down
what's going wrong, exploring what's going on in the subcircuits while
running the overall circuit can help. From viewing the overall circuit,
you can do this by bringing up the subcircuit's popup menu
(right-click or control-click its box). Then choose the View option.</p>
<center><img width="381" height="254" src="4-delve.png" /></center>
<p>After choosing this, the view will switch to the subcircuit.</p>
<center><img width="381" height="254" src="2-delve.png" /></center>
<p>Notice that the pins' values in the subcircuit match the values
being sent to them in its containing circuit.</p>

<p>While in the subcircuit, you can change it however you want;
any changes to pins' values will be propagated within the
containing circuit. (If you attempt to toggle a pin
using the Poke Tool, Logisim will pop up a dialog box
asking whether you want to create a new state; responding Yes will
divorce the state viewed with the subcircuit from the outer
circuit's state, while responding No will cancel the toggle
request.)</p>

<p>Once you have completed viewing and/or editing the parent circuit
either by double-clicking it in the explorer pane, or via the Go Out
To State submenu of the Simulate menu.</p>

<p><strong>Next:</strong> <a href="library.html">Logisim libraries</a>.</p>

</body>
</html>
